package com.cenxi.manage;

import com.cenxi.dao.entity.OperateLog;
import com.cenxi.dao.mapper.OperateLogMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Component;

/**
 * @Author cenxi
 * @Date 2023/12/7 11:42
 * @Version 1.0
 */

@Slf4j
@Component
public class ManageOperateservice {

    @Autowired
    private OperateLogMapper operateLogMapper;

    /**
     * aop异步保存日志信息
     * @param operateLog
     */
    @Async
    public void save(OperateLog operateLog) {
        operateLogMapper.insert(operateLog);
    }
}
